package com.example.servicebwic.service;

import com.example.servicebwic.entity.Client;
import com.example.servicebwic.repository.ClientRepository;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 86150
 * @Date: 2024/4/9
 * @Description: com.example.clientbwic.service
 */
@Service
public class ClientServiceImpl implements ClientService {
    @Resource
    ClientRepository clientRepository;
    @Override
    public Client getClient(Long id) {
         // 调用repository的方法获取数据
         return clientRepository.getById(id);
    }
}
